package csu.rjxyg.bean;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import com.mongodb.BasicDBObject;
import com.mongodb.util.JSON;

import csu.rjxyg.bean.core.BaseObject;


public class DBObject extends BaseObject	implements Serializable{
	private BasicDBObject bean; 
	
	public DBObject(){
		bean = new BasicDBObject();
	}
	
	public DBObject(BasicDBObject object){
		bean = object;
	}
	
	@Override
	public  Object get(String valueName){
		return bean.get(valueName);
	}
	
	@Override
	public  void set(String valueName, Object value){
		bean.put(valueName, value);
	}
	
	@Override
	public  void set(String valueName, BaseObject value){
		bean.put(valueName, value.getBean());
	}

	@Override
	public BasicDBObject getBean() {
		return bean;
	}

	@Override
	public void setBean(Object bean) {
		// TODO Auto-generated method stub
		this.bean = (BasicDBObject) bean;
	}

}
